#ifndef KINECTSNAPSHOTSETFRAME_H
#define KINECTSNAPSHOTSETFRAME_H

#ifdef KINECT

#include <QFrame>
#include <QMap>

#include "GUI/Troy/troyframe.h"

#include "global.h"
#include "GUI/layouts/flowlayout.h"

namespace Ui {
    class KinectSnapshotSetFrame;
}

/**
  * @brief The QFrame that lives inside the KinectSnapshotRecorderDialog and handles the feedback and visualizing
  * for taking snapshots.
  */
class KinectSnapshotSetFrame : public QFrame
{
private:
    Q_OBJECT
    Ui::KinectSnapshotSetFrame *ui;
    QMap<int, TroyFrame*> _snapshots;
    FlowLayout* _flowLayout;
public:
    explicit KinectSnapshotSetFrame(QWidget *parent = 0);
    ~KinectSnapshotSetFrame();
public slots:
    /**
      * @brief Sets the preview, which shows what should be captured when a snapshot is taken.
      *
      * @param preview
      */
    void setPreview(MotionKeyFrame preview);
    /**
      * @brief Adds a snapshot to the tray of snapshots.
      *
      * @param id
      * @param frame
      */
    void addSnapshot(int id, MotionKeyFrame frame);
    /**
      * @brief Deletes a snapshot from the tray.
      *
      * @param id
      */
    void deleteSnapshot(int id);
signals:
    /**
      * @brief Request that a snapshot be taken.
      */
    void snapshotRequest();
    /**
      * @brief Request that a snapshot be deleted.
      *
      * @param id
      */
    void snapshotDeleteRequest(int id);
private slots:
    void requestSnapshot();
};

#endif

#endif // KINECTSNAPSHOTSETFRAME_H
